<template>
  <div class="ceshi_a">
    {{ name }}

    <a-button type="primary" @click="$router.push('/')">返回首页</a-button>
  </div>
</template>
<script setup lang="ts">
import { ref, watch } from "vue";
import { useRoute } from "vue-router";
const route = useRoute();
const props = defineProps({
  name: {
    type: String,
    default: "测试",
  },
});
watch(
  () => route.query,
  (nv) => {
    console.log(nv);
  },
  {
    immediate: true,
  }
);
const hello = ref("测试组件");
</script>
<style scoped>
.ceshi_a {
  color: red;
}
</style>
